package list;

import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

public class ListDemo {
    public static void main(String[] args) {
        List<String> list=new LinkedList<>();
        list.add("1");
        list.add("2");
        list.add("3");
        System.out.println(list);
        String s=list.remove(2);
        System.out.println(s);
        System.out.println(list);

        list.add(1,"4");
        System.out.println(list);
    }
}
